<?php 
include_once PATH_BASE."includes/errorMsgLocalized.php";

	if(count(template::getInstance()->error)>0)
	{
		//Aggiungo messaggi errore
		?>
		<div id="error-message" title="Attenzione">
		<div class="ui-state-error ui-corner-all">
		<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 50px 0;"></span>
		
			<?php 
				foreach (template::getInstance()->error as $x=>$x_value)
				{
			?>
					<?php echo(getErrorMessage($x_value));?><br/>
			<?php 
				}
			?>
		</div>
		</div>
		
		<script>
		 $(function() {
				$( "#error-message" ).dialog({
				modal: true,
				buttons: {
				Ok: function() {
				$( this ).dialog( "close" );
				}
				}
				});
				});
		 </script>
	<?php 
	}
	
	if(count(template::getInstance()->info)>0)
	{
		//Aggiungo messaggi INFO
		?>
			<div id="info-message" title="Informazioni">
			<div class="ui-state-highlight ui-corner-all">
		    <span class="ui-icon ui-icon-info" style="float: left; margin: 0 7px 50px 0;"></span>
			<?php 
				foreach (template::getInstance()->info as $x=>$x_value)
				{
			?>
					<?php echo(getErrorMessage($x_value));?><br/>
			<?php 
				}
			?>
		</div>
		</div>
		
		<script>
		 $(function() {
				$( "#info-message" ).dialog({
				modal: true,
				buttons: {
				Ok: function() {
				$( this ).dialog( "close" );
				}
				}
				});
				});
		 </script>	
		
	<?php 	
	}

?>